package models

import (
	"time"
)

type ScoreAmount struct {
	Id    int
	Score int

	CreateAt time.Time `orm:"auto_now_add;type(datetime)"` //创建时设置为当前时间
	UpdateAt time.Time `orm:"auto_now;type(datetime)"`     //创建更新设置为当前时间

	UserId string `orm:size(32); unique; index`

	//User *User `orm:"rel(one)"`
}

type ScoreTail struct {
	Id      int
	Flag    int //收入or支出
	Score   int
	Comment string `orm:"size(4096)"`

	CreateAt time.Time `orm:"auto_now_add;type(datetime)"` //创建时设置为当前时间
	UpdateAt time.Time `orm:"auto_now;type(datetime)"`     //创建更新设置为当前时间

	//User *User `orm:"rel(fk)"`
	UserId string `orm:size(32); index`
}
